function doSubscribe() {
    jQuery(".subscribe .tnp-submit").attr('disabled', true);
    let email = jQuery(".subscribe .tnp-email").val()
    jQuery.ajax({
        type: "POST",
        url: "/common/subscribe",
        dataType: 'json',
        data: {'email': email},
        success: function (res) {
            if (res.result.success) {
                new NoticeJs({
                    text: '订阅成功',
                    type: 'success',
                    position: 'topCenter',
                    progressBar: true,
                    timeout: 30,
                    animation: {
                        open: 'animated fadeIn',
                        close: 'animated flipOutX'
                    }
                }).show();
                jQuery(".subscribe .tnp-email").val('');
            } else {
                new NoticeJs({
                    text: res.result.error_msg,
                    type: 'warning',
                    position: 'topCenter',
                    progressBar: true,
                    timeout: 30,
                    animation: {
                        open: 'animated fadeIn',
                        close: 'animated fadeOut'
                    }
                }).show();
            }
            jQuery(".subscribe .tnp-submit").attr('disabled', false);
        },
    });
    return false;
}

function loadMorePage() {
    jQuery("#load-more-page").attr('disabled', true);
    let offset = jQuery("#load-more-page").attr('offset');
    let end = jQuery("#load-more-page").attr('end');
    if (end != 'on') {
        jQuery.ajax({
            type: "POST",
            url: "/default/page_load_more",
            dataType: 'html',
            data: {'offset': offset},
            success: function (res) {
                jQuery("#home-blog-content").append(res);
                jQuery("#load-more-page").attr('disabled', false);
            }
        });
    }
}
let sticky = new Sticky('.popular-post-content', {});

jQuery('[data-toggle="tooltip"]').jTippy();